<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>选择影片</title>
  <link rel="stylesheet" href="../static/layui/css/layui.css" media="all">
 
</head>
<body style="">
<table class="layui-table" lay-data="{height:'400',width:'100%', url:'selectResourceData?is_school=1', page:true,limit:10,id:'test'}" lay-filter="test">
  <thead>
    <tr>
    
      <th lay-data="{field:'id', width:80, sort: true}">ID</th>
      <th lay-data="{field:'title', width:200}">标题</th>
      <th lay-data="{field:'img', width:200,templet: '#imgTpl'}">图片</th>
      <th lay-data="{field:'id', width:200,templet:'#selectTpl'}">选择</th>
     
    </tr>
  </thead>
</table>
  <script src="../static/layui/layui.js"></script>
  
  
<script>
layui.use('table', function(){
  var table = layui.table;
});

function selectedResource(id,name){
	parent.selectedResource(id,name);
}
</script>
<script type="text/html" id="imgTpl">
	<img data-tips-image="" style="height:auto;max-height:32px;min-width:32px" src="{{d.img}}"/>  
</script>
<script type="text/html" id="selectTpl">
   <a href="javascript:void(0);" onclick='selectedResource("{{d.id}}","{{d.title}}");'>选择</a>
</script>
</body>
</html>
